#ifndef OLLAMAFETCHERVERSION_H
#define OLLAMAFETCHERVERSION_H

#include <QObject>

class QNetworkReply;
class QNetworkAccessManager;
class OllamaFetcherVersion : public QObject
{
    Q_OBJECT
public:
    explicit OllamaFetcherVersion(QObject *parent = nullptr);

    // 设置请求模式（同步或异步）
    void setSyncMode(bool sync);

    void version();

signals:
    void onVersion(bool success, const QString& version);

private slots:
    void onRequestFinished(QNetworkReply *reply);

private:
    QNetworkAccessManager *httpManager;
    bool isSync;
};

#endif // OLLAMAFETCHERVERSION_H
